package com.hl.web;

import com.github.pagehelper.PageInfo;
import com.hl.pojo.Carouselimages;
import com.hl.pojo.Consultanttraining;
import com.hl.service.FMService;
import com.hl.util.GeneralResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/fm")
public class FMController {
    @Autowired
    private FMService fmService;
    @RequestMapping("/getFMMessage")
    public GeneralResult getFMMessage(Integer page,Integer pageSize){
        PageInfo<Consultanttraining> pageInfo = fmService.getFMMessage(page,pageSize);
        System.out.println(pageInfo);
        List<PageInfo> list = new ArrayList<>();
        list.add(pageInfo);
        return GeneralResult.success(list);
//        return GeneralResult.success("请求成功",pageInfo);
    }
}
